<?php

namespace app\mall\ui\form;

use app\mall\enum\OpsEnum;
use app\mall\enum\YesNoEnum;

/**
 * 用户积分事件表单
 */
class MallUserPointEventForm
{
    public function name()
    {
        return [
            'type' => 'input',
            'title' => '积分规则名称',
            'field' => 'name',
        ];
    }

    public function event_name()
    {
        return [
            'type' => 'input',
            'title' => '事件(英文字符)',
            'field' => 'event_name',
        ];
    }

    public function point()
    {
        return [
            'type' => 'number',
            'title' => '奖励积分',
            'field' => 'point',
        ];
    }

    public function enable()
    {
        return [
            'type' => 'radio',
            'options' => YesNoEnum::toZhArrayForSelect(),
            'title' => '是否启用',
            'field' => 'enable',
        ];
    }

    public function rule()
    {
        return [
            'type' => 'radio',
            'title' => '条件',
            'field' => 'rule',
            'options' => OpsEnum::toZhArrayForSelect(),
        ];
    }
    public function rule_value()
    {
        return [
            'type' => 'input',
            'title' => '值',
            'field' => 'rule_value',
        ];
    }
}